export const formConfig = [
    {
        name: 'name',
        type: 'input',
        placeholder: '备件名称',
    },
]

export const config = [
    {
        label: '备件名称',
        type: 'input',
        name: 'name',
        required: true,
        split: 2,
    },
    {
        label: '备件编码',
        type: 'input',
        name: 'code',
        required: true,
        split: 2,
    },
    {
        label: '备件型号',
        type: 'input',
        name: 'model',
        required: true,
        split: 2,
    },
    {
        label: '仓库名称',
        type: 'input',
        name: 'warehouse_name',
        required: true,
        split: 2,
    },
    {
        label: '库存数量',
        type: 'number',
        name: 'inventory_quantity',
        min: 0,
        required: true,
        split: 2,
    },
    {
        label: '可用数量',
        type: 'number',
        name: 'available_quantity',
        min: 0,
        required: true,
        split: 2,
    },
    {
        label: '告警数量',
        type: 'number',
        name: 'warn_quantity',
        min: 0,
        required: true,
        split: 2,
    },
    {
        label: '安全数量',
        type: 'number',
        name: 'safe_quantity',
        min: 0,
        required: true,
        split: 2,
    },
    {
        label: '备件厂家',
        type: 'input',
        name: 'manufacturer',
        required: true,
        split: 2,
    },
    {
        label: '采购价',
        type: 'input',
        name: 'purchase_price',
        required: true,
        split: 2,
    },
    {
        label: '适用型号',
        type: 'input',
        name: 'applicable_model',
        required: true,
        split: 2,
    },
    {
        label: '入库时间',
        type: 'date',
        name: 'create_time',
        required: true,
        split: 2,
    },
    {
        label: '备件图片',
        type: 'image',
        name: 'image',
        required: true,
    },
]

export const column = [
    {
        label: '备件名称',
        name: 'name',
    },
    {
        label: '备件编码',
        name: 'code',
    },
    {
        label: '备件型号',
        name: 'model',
    },
    {
        label: '仓库名称',
        name: 'warehouse_name',
    },
    {
        label: '库存数量',
        name: 'inventory_quantity',
    },
    {
        label: '可用数量',
        name: 'available_quantity',
    },
    {
        label: '告警数量',
        name: 'warn_quantity',
    },
    {
        label: '安全数量',
        name: 'safe_quantity',
    },
    {
        label: '备件厂家',
        name: 'manufacturer',
    },
    {
        label: '采购价',
        name: 'purchase_price',
    },
    {
        label: '适用型号',
        name: 'applicable_model',
    },
    {
        label: '备件图片',
        name: 'photo',
        single: true,
    },
    {
        label: '入库时间',
        name: 'create_time',
    },
    {
        title: '操作',
        name: 'action',
        width: '220',
        buttons: [
            {
                text: '查看',
                click: (val) => {},
            },
            {
                text: '编辑',
                click: (val) => {},
            },
            {
                text: '删除',
                click: (val) => {},
            },
        ],
    },
]
